<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<title>苏州科达DEMO</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
table {
	border-collapse: collapse;
	border: 1px solid black;
}

td, th {
	border: 1px solid black;
}

tr:nth-child(even) {
	background: #eee;
}
</style>
</head>
<body>
	<center>
		<c:choose>
			<c:when test="${user == null}">
				<h3 style="color:red">登录失败</h3>
				<a href="login">重新登录</a>
			</c:when>
			<c:otherwise>
				<h3 style="color:green">登录成功</h3>
				<table>
					<tr>
						<th>姓名：</th>
						<td><c:out value="${user.cn}" /></td>
					</tr>
					<tr>
						<th>登录帐号</th>
						<td><c:out value="${user.userPrincipalName}" /></td>
					</tr>
					<tr>
						<th>登录帐号（老版本）：</th>
						<td><c:out value="${user.sAMAccountName}" /></td>
					</tr>
					<tr>
						<th>邮箱：</th>
						<td><c:out value="${user.mail}" /></td>
					</tr>
					<tr>
						<th>英文缩写：</th>
						<td><c:out value="${user.initials}" /></td>
					</tr>
				</table>
				<a href="users">查看AD用户列表</a>
				<a href="attributes">查看AD用户属性列表</a>
			</c:otherwise>
		</c:choose>
	</center>
</body>
</html>
